926a3f5350f0ba5f6a52009d75fc042744b9a8a1,portal-impl/src/com/liferay/portlet/polls/lar/PollsPortletDataHandlerImpl.java,PollsPortletDataHandlerImpl,importChoice,#PortletDataContext#boolean#Map#Map#PollsChoice#,344
Before Change
throws Exception {
Long questionId = (Long)questionPKs.get(
new Long(choice.getQuestionId()));
if (questionId == null) {
questionId = new Long(choice.getQuestionId());
}
PollsChoice existingChoice = null;
try {
PollsQuestionUtil.findByPrimaryKey(questionId.longValue());
if (mergeData) {
existingChoice = PollsChoiceFinderUtil.findByUuid_G(
choice.getUuid(), context.getGroupId());
if (existingChoice == null) {
existingChoice = PollsChoiceLocalServiceUtil.addChoice(
choice.getUuid(), questionId.longValue(),
choice.getName(), choice.getDescription());
}
else {
existingChoice = PollsChoiceLocalServiceUtil.updateChoice(
existingChoice.getChoiceId(), questionId.longValue(),
choice.getName(), choice.getDescription());
}
}
else {
existingChoice = PollsChoiceLocalServiceUtil.addChoice(
questionId.longValue(), choice.getName(),
choice.getDescription());
}
After Change
throws Exception {
long questionId = MapUtil.getLong(
questionPKs, choice.getQuestionId(), choice.getQuestionId());
PollsChoice existingChoice = null;